﻿<?php
	$dbServer="127.0.0.1";
	$dbUname="root";
	$dbPasswd="";

	$objConnect=mysql_connect($dbServer,$dbUname,$dbPasswd);
	if(!$objConnect){
		echo "<script language='javascript'>";
		echo "alert('ไม่สามารถติดต่อฐานข้อมูลได้');";
		echo "</script>";
		mysql_close($objConnect);
		echo "<meta http-equiv='refresh' CONTENT='0; url=index.php'>";
	}else{
		mysql_query("SET NAMES utf8",$objConnect);
		$objDB = mysql_select_db("wedding");
	}
	
?>